Technical Q&As
QTW 49 - Determining QTW Time Values (1-Aug-95)
Q When you use MCActionSetSelectionDuration and MCActionSetSelectionBegin to set
the duration and starting point of a selection, what are the units for these
two values? I tried a start value of 0 and a duration value of 5 and the movie
did not play at all. With a duration value of 50, it lasted 1/10 of a second. I
call Play Every Frame beforehand, and SetPlaySelection is set to TRUE somewhere
beforehand.
A The number of time units that pass in one second is equal to the time scale
times the play rate. If you are playing the movie at a rate of 1.0, the number
of time units per second is just the timescale. You can get a movie's time
scale with a call to GetMovieTimeScale(). 600 is a typical value. Thus, a
duration of 50 would be 1/12 of a second.
Check out page 3 of the QuickTime 2.0 Developer Guide for Windows. It
describes the QTW time coordinate system in detail.
Technical Q&As
Previous Question | Contents | Next Question